﻿using Microsoft.EntityFrameworkCore;

namespace Infrastructure.IRepository
{
    public interface IUnitOfWork
    {
        /// <summary>
        /// 持久化更改，返回受影响的行数
        /// </summary>
        /// <returns></returns>
        public Task<int> SaveChanges();
        /// <summary>
        /// 获取上下文
        /// </summary>
        /// <returns></returns>
        public DbContext GetDbContext();
    }
}